package com.dangdang.interview.sort;

import java.util.ArrayList;
import java.util.Collections;
import java.util.List;

public class Client {

	public static void main(String[] args) {
		List<Student> students=new ArrayList<>();
		students.add(new Student("张三", 90, 77, 88));
		students.add(new Student("李四", 88, 89, 97));
		students.add(new Student("王五", 88, 77, 99));
		students.add(new Student("赵六", 94, 90, 86));
		students.add(new Student("孙七", 90, 77, 86));
		students.add(new Student("周八", 60, 91, 84));
		System.out.println("before :");
		for (Student student : students) {
			System.out.println(student);
		}
		System.out.println("after :");
		Collections.sort(students, new StudentComparable());
		for (Student student : students) {
			System.out.println(student);
		}
	}
}
